package cn.kgc.ffzw.test;

public class Vieche extends Car  {

    Integer danqi=10;
    String name="跑车";

    public Integer getDanqi() {
        return danqi;
    }

    public void setDanqi(Integer danqi) {
        this.danqi = danqi;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Vieche() {
    }

    public Vieche(Integer apeed, Integer state,Integer danqi) {
        super(apeed, state);
        this.danqi=getDanqi();
    }

    @Override
    public void run() {
        System.out.println("跑车的平均速度为"+super.getSpeed());
        System.out.println("使用氮气后的平均速度为"+(super.getSpeed()+this.getDanqi()));
        System.out.println("行驶10000米使用了"+10000/(super.getSpeed()+this.getDanqi())+"秒");
    }
}
